package app.nexttwo;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

public class NEXTTWOActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        final Button next = (Button) findViewById(R.id.button1);
    
        next.setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {
            	
            	 EditText texto = (EditText) findViewById(R.id.editText1);
            	 

                 Intent myIntent = new Intent(NEXTTWOActivity.this,activity2.class);
                 myIntent.putExtra("msg", texto.getText().toString());
                 
                 startActivityForResult(myIntent,0);
            }
            });   
    
    
    
}
}